package com.krediti.session;

import com.krediti.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.List;
import java.util.Arrays;

@Name("statusList")
public class StatusList extends EntityQuery<Status> {

	/**
	 * Generated serial version.
	 * 
	 */
	private static final long serialVersionUID = -4139073109385017133L;

	private static final String[] RESTRICTIONS = { "lower(status.naziv) like concat(lower(#{statusList.status.naziv}),'%')", };

	private Status status = new Status();

	@Override
	public String getEjbql() {
		return "select status from Status status";
	}

	@Override
	public Integer getMaxResults() {
		return 25;
	}

	public Status getStatus() {
		return status;
	}

	@Override
	public List<String> getRestrictions() {
		return Arrays.asList(RESTRICTIONS);
	}

}
